﻿using Abp.Application.Services.Dto;
using Abp.Application.Services;
using Choucius.Boilerplate9.PlasticContainers.Dto;
using System;
using System.Threading.Tasks;
using Choucius.Boilerplate9.DtoBase;
using Choucius.Boilerplate9.Enum;
using System.Collections.Generic;

namespace Choucius.Boilerplate9.PlasticContainers
{
    /// <summary>
    /// 吸塑盒
    /// </summary>
    public interface IPlasticContainerAppService : IAsyncCrudAppService<PlasticContainerDto, Guid, PagedResultRequestDto, PlasticContainerDto, PlasticContainerDto>
    {
        /// <summary>
        /// 根据RFID获取最大值
        /// </summary>
        /// <param name="rfid"></param>
        /// <returns></returns>
        Task<int> GetMaxValueByRfidAsync(string rfid);

        /// <summary>
        /// 根据RFID更新实体
        /// </summary>
        /// <param name="updateDto"></param>
        /// <returns></returns>
        Task UpdateEntityByRfidAsync(PlasticContainerDto updateDto);

        /// <summary>
        /// 根据RFID查询某一盒是否需要涂油
        /// </summary>
        /// <param name="rfid"></param>
        /// <returns></returns>
        bool IsInunction(string rfid);

        /// <summary>
        /// 批量新增
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task BulkInsertItems(ImportDto dto);

        /// <summary>
        /// 批量更新
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task BulkUpdateItems(ImportDto dto);

        /// <summary>
        /// 获取各个状态的吸塑盒数量
        /// </summary>
        /// <returns></returns>
        PlasticContainerCountDto GetStatusCount();

        Task<Dictionary<LabelStatus, int>> StatisticByStatusAsync();

        Task<Dictionary<string, int>> InboundStatisticByPlasticContainerNameAsync();
    }
}
